package org.example.basic.day06;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 清倌
 */
public class Demo01增强for {

    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("张三");
        list.add("lisi");
        list.add("王五");
        for (int i = 0; i <list.size() ; i++) {
            System.out.println(list.get(i));
        }
        for(String s : list){
            list.remove("张三");
            System.out.println(s);
        }
    }
}
